from flask_sqlalchemy import SQLAlchemy
import redis

db = SQLAlchemy()

# R = redis.StrictRedis(host='43.128.26.205', port=6379, password='rhyland', db=0, decode_responses=True)
R = redis.StrictRedis(host='127.0.0.1', port=6379, password='rhyland', db=0, decode_responses=True)

global_mode = 1
with open('admin/mode.txt', 'r', encoding='utf-8')as f:
    global_mode = int(f.read())
    f.close()